<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <span v-if='user'>
            <label for="username">username</label>
            <input type="text" id="username" placeholder="username" key='user'>
        </span>
        <span v-else>
            <label for="email">email</label>
            <input type="text" id="email" placeholder="email">
        </span>
        <button @click='user = !user'>switch</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                user: true
            }
        })
    </script>
    
</body>
</html>